<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.js"></script>
</head>
<body>
    <script>
        /* 回调函数处理耗时操作 */
        /* 异步 */
        console.log(1)
        setTimeout(()=>{
            console.log("http");
        },1000)
        console.log(2);

        /* 进程--线程 */
        /* js中异步的使用场景
        1.http
        2.定时器
        */
        console.log(1)
        $.get("http://192.168.4.18:3000/top/playlist?cat=华语",res=>{
            console.log(res);
        })
        console.log(2);
    </script>
</body>
</html>